1. Technical Field
This invention generally relates to computer systems, and more specifically relates to apparatus and methods for performing storage operations in a computer system.
2. Background Art
Since the dawn of the computer age, computers have evolved and become more and more powerful. In our present day, computers have become indispensable in many fields of human endeavor including engineering design, machine and process control, information storage and retrieval, and office computing.
Memory in a computer system is often comprised of many different levels in a hierarchy according to the memory capacity and speed. For example, most modern computer systems include a cache memory that is relatively small but very fast. Main memory, such as Random Access Memory (RAM), is typically larger than the cache, but slower. Bulk storage devices, such as hard disk drives, provide great capacity and typically retain their contents when the system is powered down, but have a speed that is relatively slow compared to cache and RAM. Because of the varying speeds of accessing information in these different types of memory devices, memory systems have been developed that automatically transfer data to and from different portions of the memory system as the data is needed. One common scheme for accessing data is known as a memory paging system that divides memory into multiple pages. When data in a page is needed, the page is typically read from the bulk storage device into main memory, and the data is then accessed in main memory. Many memory managers use a Least Recently Used (LRU) scheme for page replacement. Thus, when the portion of memory dedicated to paging is full of pages, and a new page needs to be brought into memory from bulk storage, the oldest page (least recently used) is replaced with the new page.
One system parameter that affects performance of a computer system is the size of a block that is read into memory from bulk storage at one time. This is commonly known as the block transfer size. For example, if a page is defined to be 4 kilobytes (4K), the block transfer size could be set to a single page (4K), to two pages (8K), to three pages (12K), etc. The block transfer size affects the system performance because it determines how much data is retrieved when a page fault occurs. In a system that has lots of memory, a large block transfer size generally improves performance because fewer page fault operations are needed to retrieve data. However, a large block transfer size may result in performance degradation in a system that has constrained memory resources. If the memory is limited, more page faults occur. With a large block transfer size, this means that more pages are being replaced at one time, potentially leading to more page faults that result from attempting to access a page that is no longer in memory. We see from these simple examples that the block transfer size can affect system performance, but the desired value of the block transfer size depends on whether or not memory is constrained. Note also that memory may be constrained at some instances in time (such as when running several large batch jobs), while the same memory may not be constrained at other times. For this reason, the selection of a static block transfer size often leads to a system that may suffer from performance degradations under certain conditions.
In the prior art, a default block transfer size is specified for each type of file in the system. In other words, when a computer system is initialized, a block transfer size is typically specified for each file type. This is shown in method 200 depicted in the flow diagram of FIG. 2. A default block transfer size is set to a desired value for all files of a selected file type (step 210). From that point on, the operating system accesses files using the default block transfer size for files of that type (step 220).
In the prior art, the fixed block transfer size for a particular file type creates inefficiencies under certain circumstances. Without an apparatus and method for dynamically changing block transfer size, the computer industry will continue to suffer from inefficiencies caused by specifying a fixed block transfer size for all files of a particular type.